package com.hfzy.ihk.facade.calldata.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * 呼叫来源页面
 * @author wws
 */
public enum PageFrom implements CustomEnumType {

    APP_ESTAE("0","盘源"),
    APP_LINK_CALL("1","联动CALL"),
    APP_CUSTOMER("7","电子客簿"),
    APP_CALL_HISTORY("6","APP呼叫历史"),

    PC_ESTATE("2","盘源"),
    PC_LINK_CALL("3","联动CALL客"),
    //PC_LINK_CALL_JXGJ("10","联动CALL客继续跟进"),
    PC_CUSTOMER("4","电子客簿"),

    PC_KQ("22","申请跨区登记"),
    PC_XZ("33","新增路径"),
    PC_CF("44","重新放盘"),
    PC_TAOCUSTOMER("55","淘客"),
    PC_CALLHISTORY("66","云呼管理报表"),

    PC_WLYYK("77","网络预约客页面"),

    PC_TEST("5","置业测试座机"),
    PC_AI_CALL("10","pc智能外呼"),
    PC_AI_SINGLE_CALL("11","pc智能外呼客户");//仅用于呼当前的客户 -- 外呼执行完后，不再执行其余的操作
    private PageFrom(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;
    @Override
    public String getValue() {
        return value;
    }
    @Override
    public String getDesc() {
        return desc;
    }

    private static Map<String, PageFrom> map = new HashMap<>();
    static {
        for (PageFrom value : PageFrom.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static PageFrom fromValue(String value) {
        PageFrom ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + PageFrom.class + "." + value);
        }
    }


}
